package com.sdnu.iosclub.qvs.mapper;

import com.sdnu.iosclub.qvs.entity.QvsQuestion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sdnu.iosclub.qvs.entity.vo.QvsVoterVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wcr
 * @since 2022-09-05
 */
public interface QvsQuestionMapper extends BaseMapper<QvsQuestion> {
    List<QvsQuestion> getQuestionById(@Param("id") String id);

    List<QvsQuestion> getQuestionDataById(@Param("id") String id);

    Integer getQuestionNum(@Param("id") String id);

    List<QvsVoterVo> getVotersByIdSet(@Param("set") Set<String> set,@Param("vo") QvsVoterVo qvsVoterVo);

    /**
     * 删除问题
     * @param id 问题的id
     * @return 影响行数
     */
    int deleteQuestionById(@Param("id") String id);
}
